<?php 
/**
 * This file is part of the Anota project.
 * 2011-2012 Fernando Garcia Huerta <fgarciahue@uoc.edu>
 * 
 * UOC - FUNDAMENTOS DE INFORMÁTICA EN ENTORNOS BIOINFORMÁTICOS - PEC2
 */

/**
 * templateStats
 * 
 * @package    Anota
 * @subpackage application/template
 * @author     Fernando Garcia Huerta <fgarciahue@uoc.edu>
 */
?>
<div class="bloque">
    <h2>Main statistics</h2>
    <table>
        <tr>
            <td>First process executed at:</td>
            <td width="200px"><strong><?php echo $this->procStats['first_proc_date'] ?></strong></td>
        </tr>
        <tr>
            <td>Last process executed at:</td>
            <td><strong><?php echo $this->procStats['last_proc_date'] ?></strong></td>
        </tr>
        <tr>
            <td>Total number of processes executed: </td>
            <td><strong><?php echo $this->procStats['num_procs'] ?></strong></td>
        </tr>
        <tr>
            <td>Total number of different ips:</td>
            <td><strong><?php echo $this->procStats['num_ips'] ?></td>
        </tr>
        <tr>
            <td>Total number of sequences analyzed:</td>
            <td><strong><?php echo $this->sequenceStats['num_sequences'] ?></strong></td>
        </tr>
    </table>

    <h2>Sequence Statistics</h2>
    <table>
        <tr>
            <td>Max length of sequence:</td>
            <td width="200px"><strong><?php echo $this->sequenceStats['max_length'] ?></strong></td>
        </tr>
        <tr>
            <td>Min length of sequence:</td>
            <td><strong><?php echo $this->sequenceStats['min_length'] ?></strong></td>
        </tr>
        <tr>
            <td>Average length of sequence:</td>
            <td><strong><?php echo $this->sequenceStats['avg_length'] ?></strong></td>
        </tr>
        <tr>
            <td>Max number of genes per sequence:</td>
            <td><strong><?php echo $this->sequenceStats['max_numgenes'] ?></strong></td>
        </tr>
        <tr>
            <td>Min number of genes per sequence:</td>
            <td><strong><?php echo $this->sequenceStats['min_numgenes'] ?></strong></td>
        </tr>
        <tr>
            <td>Average number of genes per sequence:</td>
            <td><strong><?php echo $this->sequenceStats['avg_numgenes'] ?></strong></td>
        </tr>
        <tr>
            <td>Max number of exons per sequence:</td>
            <td><strong><?php echo $this->sequenceStats['max_numexons'] ?></strong></td>
        </tr>
        <tr>
            <td>Min number of exons per sequence:</td>
            <td><strong><?php echo $this->sequenceStats['min_numexons'] ?></strong></td>
        </tr>
        <tr>
            <td>Average number of exons per sequence:</td>
            <td><strong><?php echo $this->sequenceStats['avg_numexons'] ?></strong></td>
        </tr>
    </table>

    <h2>Processes Statistics</h2>
    <table>
        <tr>
            <td>Max size of uploaded file:</td>
            <td width="200px"><strong><?php echo $this->procStats['max_filesize'] ?></strong></td>
        </tr>
        <tr>
            <td>Min size of uploaded file:</td>
            <td><strong><?php echo $this->procStats['min_filesize'] ?></strong></td>
        </tr>
        <tr>
            <td>Average size of uploaded file:</td>
            <td><strong><?php echo $this->procStats['avg_filesize'] ?></strong></td>
        </tr>
        <tr>
            <td>Max proccess time [hh:mm:ss]:</td>
            <td><strong><?php echo $this->procStats['max_proctime'] ?></strong></td>
        </tr>
        <tr>
            <td>Min proccess time [hh:mm:ss]:</td>
            <td><strong><?php echo $this->procStats['min_proctime'] ?></strong></td>
        </tr>
        <tr>
            <td>Average process time [hh:mm:ss]:</td>
            <td><strong><?php echo $this->procStats['avg_proctime'] ?></strong></td>
        </tr>
    </table>

    <h2>Option Statistics</h2>

    <table>
        <tr>
            <td colspan="2"><h3>Display Option</h3></td>
        </tr>
        
        <tr>
            <td>Display best Start codons found on sequence [-b]:</td>
            <td  width="200px"><strong><?php echo $this->optionStats['b'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Display best Donor sites found on sequence [-d]:</td>
            <td><strong><?php echo $this->optionStats['d'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Display best Acceptor sites found on sequence [-a]:</td>
            <td><strong><?php echo $this->optionStats['a'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Display best Stop codons found on sequence [-e]:</td>
            <td><strong><?php echo $this->optionStats['e'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Display best First exons found on sequence [-f]:</td>
            <td><strong><?php echo $this->optionStats['f'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Display best Internal exons found on sequence [-i]:</td>
            <td><strong><?php echo $this->optionStats['i'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Display best Terminal exons found on sequence [-t]:</td>
            <td><strong><?php echo $this->optionStats['t'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Display best Single genes found on sequence [-s]:</td>
            <td><strong><?php echo $this->optionStats['s'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Display best exons (all) found on sequence [-x]:</td>
            <td><strong><?php echo $this->optionStats['x'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Display Open Reading Frames found on sequence [-z]:</td>
            <td><strong><?php echo $this->optionStats['z'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Display Genomic sequence in predicted genes [-D]:</td>
            <td><strong><?php echo $this->optionStats['upper_d'] ?></strong> times.</td>
        </tr>

        <tr>
            <td colspan="2"><h3>Output Option</h3></td>
        </tr>

        <tr>
            <td>geneid format [-]: </td>
            <?php $value = $this->procStats['num_procs'] - $this->optionStats['upper_g'] - $this->optionStats['upper_x'] - $this->optionStats['upper_m'] - $this->optionStats['m'] ?>
            <td><strong><?php echo $value ?></strong> times.</td>
        </tr>        
        <tr>
            <td>gff format [-G]: </td>
            <td><strong><?php echo $this->optionStats['upper_g'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Extended format (gff or geneid) [-X]: </td>
            <td><strong><?php echo $this->optionStats['upper_x'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>XML output (see -m) [-M]: </td>
            <td><strong><?php echo $this->optionStats['upper_m'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>See DTD for XML output [-m]: </td>
            <td><strong><?php echo $this->optionStats['m'] ?></strong> times.</td>
        </tr>

        <tr>
            <td colspan="2"><h3>Strand Option</h3></td>
        </tr>

        <tr>
            <td>Predictions in both strands of sequence [-]: </td>
            <?php $value = $this->procStats['num_procs'] - $this->optionStats['upper_w'] - $this->optionStats['upper_c'] ?>
            <td><strong><?php echo $value ?></strong> times.</td>
        </tr>
        <tr>
            <td>Predictions only in forward strand of sequence [-W]: </td>
            <td><strong><?php echo $this->optionStats['upper_w'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Predictions only in reverse strand of sequence [-C]: </td>
            <td><strong><?php echo $this->optionStats['upper_c'] ?></strong> times.</td>
        </tr>

        <tr>
            <td colspan="2"><h3>Engine Option</h3></td>
        </tr>

        <tr>
            <td>Only signal and exon prediction (gene assembling disabled) [-o]: </td>
            <td><strong><?php echo $this->optionStats['o'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Force prediction of a complete gene [-F]: </td>
            <td><strong><?php echo $this->optionStats['upper_f'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Only gene assembling (exons provided from file) [-O]: </td>
            <td><strong><?php echo $this->optionStats['upper_o'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Switch ORF searching on [-Z]: </td>
            <td><strong><?php echo $this->optionStats['upper_z'] ?></strong> times.</td>
        </tr>

        <tr>
            <td colspan="2"><h3>Param Option</h3></td>
        </tr>

        <tr>
            <td>Aspergillus param: </td>
            <td><strong><?php echo $this->optionStats['aspergillus'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Cinereus param: </td>
            <td><strong><?php echo $this->optionStats['cinereus'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Cneomorfans param: </td>
            <td><strong><?php echo $this->optionStats['cneomorfans'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Dictyostelium param: </td>
            <td><strong><?php echo $this->optionStats['dictyostelium'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Dros param: </td>
            <td><strong><?php echo $this->optionStats['dros'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Human1iso param: </td>
            <td><strong><?php echo $this->optionStats['human1iso'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Human3iso param: </td>
            <td><strong><?php echo $this->optionStats['human3iso'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Neurospora param: </td>
            <td><strong><?php echo $this->optionStats['neurospora'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Plasmodium param: </td>
            <td><strong><?php echo $this->optionStats['plasmodium'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Rice param: </td>
            <td><strong><?php echo $this->optionStats['rice'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Tetraodon param: </td>
            <td><strong><?php echo $this->optionStats['tetraodon'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Wheat param: </td>
            <td><strong><?php echo $this->optionStats['wheat'] ?></strong> times.</td>
        </tr>
        <tr>
            <td>Yeast param: </td>
            <td><strong><?php echo $this->optionStats['yeast'] ?></strong> times.</td>
        </tr>
    </table>
</div>        
